package net.poddubnyak.friendlist.service;

import java.util.List;

import net.poddubnyak.friendlist.domain.User;

/**
 * UserService interface represents Service interface for User class.
 * 
 * @author Poddubnjak Petr
 */
public interface UserService {

	/**
	 * Add User object
	 * 
	 * @param user
	 */
	public void addUser(User user);

	/**
	 * Delete User object
	 * 
	 * @param id
	 *            - id of user
	 */
	public void removeUser(Integer id);

	/**
	 * Update User object
	 * 
	 * @param user
	 *            - wich needed to update
	 */
	public void updateUser(User user);

	/**
	 * Get list of all User objects
	 * 
	 * @return - list of all users
	 */
	public List<User> listUser();

	/**
	 * Get list of 5 User objects with max. rating variables
	 * 
	 * @return - list of 5 toprated User objects.
	 */
	public List<User> listTopUsers();

	/**
	 * Get list of User objects with similar groupId variables
	 * 
	 * @param groupId
	 *            - id of group
	 * @return - list of classmates User objects
	 */
	public List<User> listClassmates(String groupId);

	/**
	 * Gets User object with some id variable
	 * 
	 * @param id
	 *            - id of User object
	 * @return - User object
	 */
	public User getUserById(Integer id);

	/**
	 * Gets User object by email variable
	 * 
	 * @param email
	 *            - addres of users email
	 * @return - User object
	 */
	public User getUserByEmail(String email);
}
